
<!DOCTYPE html>
<html lang="zh">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>笔记列表</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link rel="stylesheet" href="ruoyi/layui/css/layui.css">
    <link href="../../nuoyi/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../../nuoyi/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="../../nuoyi/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=20201129" rel="stylesheet"/>
    <link href="../../nuoyi/css/animate.css" rel="stylesheet"/>
    <link href="../../nuoyi/css/style.css?v=20200903" rel="stylesheet"/>
    <link href="../../nuoyi/ruoyi/css/ry-ui.css?v=4.6.0" rel="stylesheet"/>
    <link rel="stylesheet" href="/editor/css/style.css" />
    <link rel="stylesheet" href="/editor/css/editormd.css" />
</head>
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="role-form">
                <div class="col-sm-12 search-collapse">
                    <form id="menu-form">
                        <div class="select-list">
                            <ul>
                                <li>
                                    标题名称：<input type="text" id="title" name="title"/>
                                </li>
                                <li>
                                    <div id="list-type"></div>
                                </li>
                                <li>
                                    备注：<input id="note" type="text" name="menuName"/>
                                </li>
                                <li>
                                    <!-- 提供额外的视觉效果，标识一组按钮中的原始动作 -->
                                    <button type="button" class="btn btn-primary" id="save-note">笔记保存</button>
                                </li>
                            </ul>
                        </div>
                    </form>
                </div>
            </form>
        </div>

        <div id="layout">
            <div id="test-editormd">
                <textarea id="content-main" style="display:none;">

#### Disabled options

- TeX (Based on KaTeX);
- Emoji;
- Task lists;
- HTML tags decode;
- Flowchart and Sequence Diagram;

#### Editor.md directory

    editor.md/
            lib/
            css/
            scss/
            tests/
            fonts/
            images/
            plugins/
            examples/
            languages/
            editormd.js
            ...

```html
&lt;!-- English --&gt;
&lt;script src="../dist/js/languages/en.js"&gt;&lt;/script&gt;

&lt;!-- 繁體中文 --&gt;
&lt;script src="../dist/js/languages/zh-tw.js"&gt;&lt;/script&gt;
```
</textarea>
            </div>

        </div>

    </div>
</div>
<script src="../../nuoyi/js/jquery.min.js"></script>
<script src="../../nuoyi/js/bootstrap.min.js"></script>
<!-- bootstrap-table 表格插件 -->
<script src="../../nuoyi/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20201129"></script>
<script src="../../nuoyi/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20201129"></script>
<script src="../../nuoyi/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js?v=20201129"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="../../nuoyi/ajax/libs/validate/jquery.validate.min.js"></script>
<script src="../../nuoyi/ajax/libs/validate/messages_zh.min.js"></script>
<script src="../../nuoyi/ajax/libs/validate/jquery.validate.extend.js"></script>
<!-- jquery-validate 表单树插件 -->
<script src="../../nuoyi/ajax/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
<!-- 遮罩层 -->
<script src="../../nuoyi/ajax/libs/blockUI/jquery.blockUI.js"></script>
<script src="../../nuoyi/ajax/libs/iCheck/icheck.min.js"></script>
<script src="../../nuoyi/ajax/libs/layer/layer.min.js"></script>
<script src="../../nuoyi/ajax/libs/layui/layui.js"></script>
<script src="../../nuoyi/ruoyi/js/common.js?v=4.6.0"></script>
<script src="../../nuoyi/ruoyi/js/ry-ui.js?v=4.6.0"></script>
<script src="/editor/js/jquery.min.js"></script>
<script src="/editor/js/editormd.min.js"></script>

<script type="text/javascript">
    var testEditor;

    $(function() {
        testEditor = editormd("test-editormd", {
            width   : "100%",
            height  : 640,
            syncScrolling : "single",
            path    : "../lib/"
        });
    });

    $(function(){
        var data=urldata('get','/notetype','')
        var str=' 菜单状态：<select id="typelist" name="visible">'
        str+='<option value="0">无</option>'
        for(var i= 0; i < data.data.length ; i++) {
            str+='<option value='+data.data[i].key+'>'+data.data[i].value+'</option>'
        }
        str+='</select>'
        $("#list-type").html(str)
    });





    $("#save-note").click(function(){
        var content=$("#content-main").html();
        var title=$("#title").val();
        var typeid=$("#typelist").val();
        var note=$("#note").val();
        var data={'title':title,'typeid':typeid,'content':content,'note':note};
        var result=urldata('put','/note',data);
        if(result.code==0){
            layer.msg("保存成功");
        }
    })

    function urldata(requestObject,url,data) {
        var data1='';
        $.ajax({
            type: requestObject,
            url: url,
            data:data,
            async:false,
            success: function(data) {
                data1=data;
            }
        })
        return data1
    }

</script>

</body>
</html>